﻿/*
 * ©2009-2011 XELF
 * http://xelf.info
 */

using System;

namespace XELF.Framework {
	public static partial class MathHelper {
		public static float SmoothStep(float min, float max, float x) {
			x = MathHelper.Clamp((x - min) / (max - min), 0, 1);
			return x * x * x * (3 - 2 * x);
		}
		public static float SmoothStep2(float min, float max, float x) {
			x = MathHelper.Clamp((x - min) / (max - min), 0, 1);
			return x * x * x * (x * (x * 6 - 15) + 10);
		}
	}
}
